<template>
	<view class="mypage">
		<scroll-view class="content" scroll-y>
			<view class="user">
				<view class="job">
					<view class="job_center">
						<view class="job_center_item" @click="cleanAddresIndex">
							<view class="userlefttext">想去的城市</view>
							<u-icon :label="hopeAddrName?hopeAddrName:'请选择'" label-color="#0575FF" color="#0575FF" name="arrow-down"
								size="18" label-pos="left" space="5"></u-icon>
						</view>
						<u-line></u-line>
						<view class="job_center_item" @click="cleanJobIndex">
							<view class="userlefttext">想做的工作</view>
							<u-icon :label="gongzhongName?gongzhongName:'请选择'" label-color="#0575FF" color="#0575FF" name="arrow-down"
								size="18" label-pos="left" space="5"></u-icon>
						</view>
						<u-line></u-line>
						<view class="job_center_item" @click="show=true;hideKeyboard()">
							<view class="userlefttext">期望工资</view>
							<u-icon :label="moeny" label-color="#0575FF" color="#0575FF" name="arrow-down" size="18"
								label-pos="left" space="5"></u-icon>
						</view>
						<u-line></u-line>
						<view class="job_center_item" @click="fulishow=true;hideKeyboard()">
							<view class="userlefttext">福利要求</view>
							<u-icon :label="fuliItems?fuliItems:'请选择'" label-color="#0575FF" color="#0575FF" name="arrow-down" size="18"
								label-pos="left" space="5"></u-icon>
						</view>
						<u-line></u-line>
						<view class="job_center_item" @click="isshowJob=true;hideKeyboard()">
							<view class="userlefttext">找工作状态</view>
							<u-icon :label="jobStae" label-color="#0575FF" color="#0575FF" name="arrow-down" size="18"
								label-pos="left" space="5"></u-icon>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
		<view class="footer">
			<view class="footer_bgview" @click="commit()">
				<button class="footer_btn">提交</button>
			</view>
			<u-action-sheet style="border-radius: 10px;" :show="isshowJob" :actions="jobStaeList" title="请选择状态"
				openType="launchApp" @close="isshowJob = false;jobClose()" @select="jobSelect">
			</u-action-sheet>
			<u-popup :show="fulishow" @close="close" @open="open">
				<!-- <view class="classifyBigBox">
					<view class="oneClassify flex" :class="{selectActive:selected[item.id]==true}"
						v-for="(item,i) in classifyList" @click="onSelectClassify(item.id)">
						{{item.name}}
					</view>
				</view> -->
				<view class="classifyBigBox">
					<view v-for="(item,index) in classifyList" :key="index" @click="choice(index)"
						:class="[item.selected?'selde':'noselde']">
						{{item.selected?item.name:item.name}}
					</view>
				</view>
				<view class="addres-footer dis-row">
					<view class="addres-btn" @click="onClear">清除</view>
					<view class="addres-btn" @click="onConfirmFiltrate">确定选择</view>
				</view>
			</u-popup>
			<u-picker :show="gongzhongisShow" ref="gongzhongPicker" :title="hangyeTypeStr" :columns="gongzhongcolumns"
				@confirm="hangyeConfirm" @change="bindMultiPickerColumnChange"
				@cancel="gongzhongisShow = false"></u-picker>

			<pop ref="city" :direction="direction" :is_close="true" :is_mask="true" :width="100">
				<view class="con-del dis-clm" v-if="cityList && cityList.length>0">
					<view class="cityName">选择地点</view>
					<view class="checkgongzhongLList row-box" v-if="selectCity.length>0">
						<view v-for="(se,sc) in selectCity" :key="sc" class="dis-row" @click="delSelectCity(se,sc)">
							<text>{{se.name}}</text><label>
								<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/icon/cc.png"></image>
							</label>
						</view>
					</view>
					<view class="cityList dis-row">
						<view class="sheng dis-clm">
							<scroll-view scroll-y="true">
								<view class="sheng-Lst" v-for="(cityitem,cityindex) in provinceList" :key="cityindex"
									:class="{'shengActive':(cityitem.active==1)}"
									@click="cityClick(cityitem,cityindex,1)">
									{{cutstr(cityitem.name,10)}}
								</view>
							</scroll-view>
						</view>
						<view class="shi dis-clm">
							<scroll-view scroll-y="true">
								<view class="shi-lst" v-for="(shiItem,shiIndex) in cityList" :key="shiIndex"
									:class="{'shiActive':(shiItem.active==1)}" @click="cityClick(shiItem,shiIndex,2)">
									{{cutstr(shiItem.name,10)}}
								</view>
							</scroll-view>
						</view>
					</view>

					<view class="addres-footer dis-row">
						<view class="addres-btn" @click="cleanNew">清除</view>
						<view class="addres-btn" @click="citySure">确定选择</view>
					</view>
				</view>
			</pop>
			<pop ref="job" :direction="direction" :is_close="true" :is_mask="true" :width="100">
				<view class="con-del dis-clm" v-if="cityList && cityList.length>0">
					<view class="cityName">选择工种</view>
					<view class="checkgongzhongLList row-box" v-if="selectgongzhong.length>0">
						<view v-for="(se,sc) in selectgongzhong" :key="sc" class="dis-row"
							@click="delSelectgongzhong(se,sc)">
							<text>{{se.skillName}}</text><label>
								<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/icon/cc.png"></image>
							</label>
						</view>
					</view>
					<view class="cityList dis-row">
						<view class="sheng dis-clm">
							<scroll-view scroll-y="true">
								<view class="sheng-Lst" v-for="(item,index) in gongzhongList" :key="index"
									:class="{'shengActive':(item.id==1)}" @click="gongzhongClick(item,index,1)">
									{{item.skillName}}
								</view>
							</scroll-view>
						</view>
						<view class="shi dis-clm">
							<scroll-view scroll-y="true">
								<view class="shi-lst" v-for="(item,index) in gongzhongList[gongzhongIndex1].children"
									:key="index" :class="{'shiActive':(item.id==1)}"
									@click="gongzhongClick(item,index,3)">
									{{item.skillName}}
								</view>
							</scroll-view>
						</view>
						<!-- <view class="qu dis-clm">
							<scroll-view scroll-y="true">
								<view class="qu-lst"
									v-for="(item,index) in gongzhongList[gongzhongIndex1].children[gongzhongIndex2].children"
									:key="index" :class="{'quActive':(item.id==1)}"
									@click="gongzhongClick(item,index,3)">{{item.skillName}}</view>
							</scroll-view>
						</view> -->
					</view>

					<view class="addres-footer dis-row">
						<view class="addres-btn" @click="cleangongzhong">清除</view>
						<view class="addres-btn" @click="gongzhongSure">确定选择</view>
					</view>
				</view>
			</pop>
			<u-picker :show="show" ref="uPicker" :columns="columns" @cancel="show=false" @confirm="confirm"
				@change="changeHandler"></u-picker>
			<!-- <u-action-sheet style="border-radius: 10px;" :show="isshowsex" :actions="sexList" title="请选择性别"
				openType="launchApp" @close="isshowsex = false;sexClose()" @select="sexSelect">
			</u-action-sheet>
			<u-picker :show="isshowmingzu" ref="mingzu" :columns="mingzuListcolumns" @confirm="mingzuConfirm"
				@change="bindMultiPickerColumnChange" @cancel="isshowmingzu = false"></u-picker>
			<address-picker :show="addressShow" closeOnClickOverlay @confirm='confirmAddress'
				@cancel='addressShow=false' @close='addressShow = false' :address-data="addressData" :indexs="indexs"
				:areaId="areaId" :type="type"></address-picker>

			<u-datetime-picker :show="dateShow" v-model="value1" mode="date" @confirm="dateConfirm" @cancel="dateCancel"
				:formatter="formatter"></u-datetime-picker>
			<u-picker :show="xuelishow" ref="xueli" :columns="xuelicolumns" @confirm="xueliConfirm"
				@change="bindMultiPickerColumnChange" @cancel="xuelishow = false"></u-picker> -->
		</view>

	</view>
</template>

<script>
	import Index from "@/common/index-model.js"
	import pop from "@/components/ming-pop/ming-map.vue"
	import fun from "@/common/publicFun.js"
	let index = new Index()
	let that = null
	export default {
		data() {
			return {
				status: 0,
				jobStae: "找活中",
				jobStaeList: [{
						"id": 0,
						"name": "找活中"
					},
					{
						"id": 1,
						"name": "暂不找活"
					},
					{
						"id": 2,
						"name": "有活考虑新工作"
					}
				],
				isshowJob: false,
				fuliItems: '请选择',
				fuliIds: '',
				classifyList: [],
				selected: {}, //选取的分类 ,用对象更方便存取数据
				fulishow: false,
				moeny: '请选择',
				show: false,
				salaryMin: 0,
				salaryMax: 0,
				columns: [],
				columnData: [],
				selectgongzhong: [],
				gongzhongcolumns: [],
				gongzhongList: [],
				gongzhongdata: [],
				gongzhongisShow: false, // 是否显示工种选择
				hangyeTypeStr: '',
				gongzhongIndex1: 0,
				gongzhongIndex2: 0,
				gongzhongIndex3: 0,
				gongzhongIds: '',
				gongzhongName: '请选择',
				model: {
					skillLevel1: 0,
					skillLevel2: 0,
					skillLevel3: 0,
				},
				cityLists: [],
				provinceList: [],
				cityList: [],
				countyList: [],
				selectCity: [],
				hopeAddrIds: '',
				hopeAddrName: '请选择',
				direction: 'below',
				//定义前端选中的值
				selectList: "",
				selectId: [],
				data:{}
			};
		},
		components: {
			pop
		},
		onLoad(opt) {
			let data = JSON.parse(opt.data);
			this.data = data
			console.log('传递过来的值是', data)
			this.hopeAddrName = data.hopeAddr
			this.status = data.status
			this.gongzhongName = data.skills
			this.salaryMin = data.salary
			this.salaryMax = data.salaryMax
			this.moeny = data.salary?data.salary + ' - ' + data.salaryMax + '元':'请选择'
			this.fuliItems = data.labelsStr
			this.fuliIds = data.labels
			this.hopeAddrIds = data.hopeAddrIds
			this.gongzhongIds = data.skillsId

			this.jobStae = data.status == 0 ? "找活中" : data.status == 1 ? "暂不找活" : "有活考虑新工作"
			this.getNation()
			this.getxueLiData()
		},
		onShow() {
			this.getQueryType()
			this.getCityList()
			this.getTypeItem()
			let arr = []
			for (let k = 0; k <= 50; k++) {
				arr[k] = k * 100
			}
			// for (let i = index + 1; i < index + 50; i++) {
			// 	arr.push(i *100)
			// }
			this.columns[0] = arr
			this.columns[1] = arr
			console.log('columns\columns', this.columns)
		},
		methods: {
			choice(index) {
				//当再次被选中时，取消当前选中项
				if (this.classifyList[index].selected == true) {
					this.classifyList[index].selected = false;
					//取消选中时删除数组中的值
					for (var i = 0; i < this.selectId.length; i++) {
						if (this.selectId[i] === this.classifyList[index].id) {
							this.selectId.splice(i, 1);
						}
					}
					this.selectList = this.selectId
					console.log("选中的值", this.selectId)
					console.log("选中的值selectList", this.selectList)
				} else {
					this.classifyList[index].selected = true;
					this.selectId.push(this.classifyList[index].id)
					for (var i = 0; i < this.selectId.length; i++) {
						console.log("选中的值", this.selectId[i])
					}
					this.selectList = this.selectId
					console.log("选中的值", this.selectId)
					console.log("选中的值selectList", this.selectList)
				}
			},
			commit() {
				let data = {
					"hopeAddrIds": this.hopeAddrIds,
					"skillsId": this.gongzhongIds,
					"labels": this.fuliIds,
					"salary": this.salaryMin,
					"salaryMax": this.salaryMax,
					"status": this.status
				}
				console.log('提交的工作信息是', data)
				index.getPublicUserMember(data, 'client/card/modify', 'post', res => {
					if (res.data.code == 200 && res.data.success) {
						index.show_tips('修改成功')
						setTimeout(() => {
							uni.navigateBack();
						}, 2000)
					} else {
						index.show_tips(res.data.message);
						return false
					}
				})
			},
			jobSelect(e) {
				console.log('选择的工种状态是', e)
				this.jobStae = e.name
				this.status = e.data.id
			},
			jobClose() {},
			getTypeItem() {
				index.getPublicMember({}, 'client/public/labellist', 'get', res => {
					// this.$refs.paging.complete(res.data.result.records);
					console.log("标签内容是", res.data.result);
					this.classifyList = res.data.result
					if(this.data.labels){
						console.log('传过来选中的是',this.data.labels)
						this.selectId=this.selectList = this.data.labels.split(',')
						console.log('传过来选中的是',this.data.labels,this.selectList,'-------------',this.selectId)
						let select = [] //选择的筛选结果数组
						this.selectList.forEach((item, index) => {
							console.log('++++++++++++++++++++++++++++',item, index)
							for (let i = 0; i < this.classifyList.length; i += 1) {
								if(this.classifyList[i].id == item) {
									let data =  this.classifyList[i]
									data.selected = true
									this.$set(this.classifyList,this.classifyList[i],data)	
								}
							}
						})
					}
				})
			},
			//选取分类
			onSelectClassify(id) {
				this.$set(this.selected, id, !this.selected[id]) //动态更新视图数据
			},
			//重置
			onClear() {
				for (var i = 0; i < this.classifyList.length; i++) {
					if(this.classifyList[i].selected == true){
					let item =  this.classifyList[i]
					item.selected = false
					this.$set(this.classifyList,this.classifyList[i],item)	
					}
				    // this.classifyList[index].selected = false;
				}
				this.selected = []
				this.select = []
				console.log(this.classifyList, "选择结果数组----classifyList-");
				console.log(this.selectList, "选择结果数组----selectList-");
				console.log(this.selectId, "选择结果数组----selectId-");
			},

			//提交筛选
			onConfirmFiltrate() {
				this.fulishow = false
				let select = [] //选择的筛选结果数组
				this.selectList.forEach((item, index) => {
					console.log(item, index)
					for (let i = 0; i < this.classifyList.length; i += 1) {
						this.classifyList[i].id == item ? select.push(this.classifyList[i].name) : ''
					}
				})

				console.log(this.selectList, "选择结果数组-----", select);
				// if (!ids || !names) {
				// 	index.show_tips('请选择福利')
				// 	return false
				// }
				this.fuliIds = this.selectList.length > 0 ? this.selectList.join(',') : ''
				this.fuliItems = select.length > 0 ? select.join(',') : ''
				this.$refs.paging.reload();
			},

			open() {
				// console.log('open');
				// this.selected = []
			},
			close() {
				this.fulishow = false
			},
			changeHandler(e) {
				console.log('监听变化', e)
				const {
					columnIndex,
					value,
					values, // values为当前变化列的数组内容
					index,
					// 微信小程序无法将picker实例传出来，只能通过ref操作
					picker = this.$refs.uPicker
				} = e
				let inter = []
				// if (index == 0) {
				// 	inter.push('面议')
				// } else {
				for (let i = index + 1; i < index + 50; i++) {
					inter.push(i * 100)
				}
				// }
				this.columnData[index] = inter

				// if (columnIndex === 0) {
				picker.setColumnValues(1, this.columnData[index])
				// }
			},
			// 回调参数为包含columnIndex、value、values
			confirm(e) {
				console.log('confirm', e)
				this.salaryMin = e.value[0]
				this.salaryMax = e.value[1]
				this.moeny = e.value[0] + '-' + e.value[1] + '元'
				this.show = false
			},
			gongzhongSure() {
				let gongzhongIndex = '',
					gongzhongName = '';
				this.selectgongzhong.forEach((v, i) => {
					gongzhongIndex += v.id + ',';
					gongzhongName += v.skillName + ',';
				})
				if (!gongzhongIndex || !gongzhongName) {
					index.show_tips('请选择工种')
					return false
				}
				this.gongzhongIds = index.strTrim(gongzhongIndex, ',');
				this.gongzhongIds = this.gongzhongIds.substring(0, this.gongzhongIds.length)
				this.gongzhongName = this.strHandle(gongzhongName, ',');
				this.gongzhongName = this.gongzhongName.substring(0, this.gongzhongName.length)
				this.$refs.job.close()
			},
			cleangongzhong() {
				this.gongzhongIds = ''
				this.gongzhongName = ''
				this.$refs.job.close()
			},
			//移除选中的地点
			delSelectgongzhong(se, sc) {
				if (this.selectgongzhong.length > 0) {
					this.selectgongzhong.splice(sc, 1)
					//delete this.selectCheckgognzhong[sc]
				}
			},
			gongzhongClick(item, index, leave) {
				console.log('当前点击-----', item, index, leave)
				if (leave == 1) {
					this.gongzhongIndex1 = index
				} else if (leave == 2) {
					this.gongzhongIndex2 = index
				} else {
					this.gongzhongIndex3 = index
					if (this.selectgongzhong.length >= 3) {
						index.show_tips('工种选择不能超过3个');
						return false;
					}
					let cs = this.selectgongzhong.filter((cc) => cc.id == item.id);
					if (!cs[0]) {
						this.selectgongzhong.push(item);
					}
				}
			},
			cleanJobIndex() {
				if (uni.getStorageSync('token')) {
					this.$refs.job.show()
				} else {
					index.show_tips('请先登录')
					setTimeout(() => {
						index.redirectto('../../pagesC/login/login')
					}, 300)
					return false
				}
			},
			cityClick(item, inx, type) {
				if (type === 1) {
					this.cityList = item.child;
					this.countyList = item.child[0].child;
					this.provinceList.forEach((v, i) => {
						if (v.active == 1) {
							this.provinceList[i].active = 0;
						}
					})
					this.provinceList[inx].active = 1;
				} else if (type === 2) {
					this.countyList = item.child;
					if (this.selectCity.length >= 3) {
						index.show_tips('城市选择不能超过3个');
						return false;
					}
					let cs = this.selectCity.filter((cc) => cc.id == item.id);
					if (!cs[0]) {
						this.selectCity.push(item);
					}
					this.cityList[inx].active = 1;
				} else if (type === 3) {
					this.countyList.forEach((v, i) => {
						if (v.active == 1) {
							this.countyList[i].active = 0;
						}
					})
					this.countyList[inx].active = 1;
				}
			},
			//移除选中的地点
			delSelectCity(se, sc) {
				if (this.selectCity.length > 0) {
					this.selectCity.splice(sc, 1)
					//delete this.selectCheckgognzhong[sc]
				}
			},
			cleanAddresIndex() {
				if (uni.getStorageSync('token')) {
					this.$refs.city.show()
				} else {
					index.show_tips('请先登录')
					setTimeout(() => {
						index.redirectto('../../pagesC/login/login')
					}, 300)
					return false
				}
			},
			//清除选中的地址
			cleanNew() {
				this.hopeAddrIds = '';
				this.hopeAddrName = '';
				this.$refs.city.close()
			},
			citySure() {
				let hopeAddrIds = '',
					hopeAddrName = '';
				this.selectCity.forEach((v, i) => {
					hopeAddrIds += v.id + ',';
					hopeAddrName += v.name + ',';
				})
				if (!hopeAddrIds || !hopeAddrName) {
					index.show_tips('请选择省市区')
					return false
				}
				this.hopeAddrIds = index.strTrim(hopeAddrIds, ',');
				this.hopeAddrName = this.strHandle(hopeAddrName, ',');
				this.hopeAddrIds = this.hopeAddrIds.substring(0, this.hopeAddrIds.length)
				this.hopeAddrName = this.hopeAddrName.substring(0, this.hopeAddrName.length)
				this.$refs.city.close();
			},
			cutstr(str, len) {
				var str_length = 0;
				var str_len = 0;
				var str_cut = new String();
				str_len = str.length;
				for (var i = 0; i < str_len; i++) {
					var a = str.charAt(i);
					str_length++;
					if (escape(a).length > 4) {
						//中文字符的长度经编码之后大于4  
						str_length++;
					}
					str_cut = str_cut.concat(a);
					if (str_length >= len) {
						str_cut = str_cut.concat("...");
						return str_cut;
					}
				}
				//如果给定字符串小于指定长度，则返回源字符串；  
				if (str_length < len) {
					return str;
				}
			},
			strHandle(str, char = ',') {
				str = index.strTrim(str, char);
				return index.strRep(str, ',', '、');
			},
			//获取省市区数据列表
			getCityList() {
				index.getPublicUserMember({}, 'client/public/find/areaList', 'get', res => {
					console.log('获取城市列表数据', res.data)
					if (res.data.code == 200 && res.data.success) {
						let cityList = res.data.result;
						let province = [];
						cityList.forEach((item, index) => {
							if (item.pid == 0) {
								item.active = 0;
								let city = [];
								cityList.forEach((t, ti) => {
									if (t.pid == item.id) {
										t.active = 0;
										let county = [];
										cityList.forEach((th, tc) => {
											if (th.pid == t.id) {
												th.active = 0;
												county.push(th);
											}
										})
										t.child = county;
										city.push(t);
									}
								})
								item.child = city;
								province.push(item);
							}
						});
						this.cityLists = province;
						province[0].active = 1;
						this.provinceList = province;
						this.cityList = province[0].child;
						this.countyList = province[0].child[0].child;
					}
				})
			},

			hangyeConfirm(e) {
				this.gongzhongisShow = false
			},
			//picker滑动改变时触发
			bindMultiPickerColumnChange(e) {
				console.log('监听变化', e)
				const {
					columnIndex,
					value,
					values, // values为当前变化列的数组内容
					index,
					// 微信小程序无法将picker实例传出来，只能通过ref操作
					picker = this.$refs.gongzhongPicker
				} = e
				console.log('第几列：' + columnIndex + '，下标值为：' + index + '=====' + e.indexs)
				// this.model.userInfo.type = this.gongzhongList[index].id
				// this.hangyeType = value[0]
				let arr = []
				for (let k = 0; k < this.gongzhongList.length; k++) {
					arr[k] = this.gongzhongList[k].skillName
				}
				this.gongzhongcolumns.splice(0, 0, arr)
				console.log('行业类别0000', arr)
				let arr1 = []
				for (let k = 0; k < this.gongzhongList[e.indexs[0]].children.length; k++) {
					arr1[k] = this.gongzhongList[e.indexs[0]].children[k].skillName
				}
				console.log('行业类别2', arr1)
				this.gongzhongcolumns.splice(1, 1, arr1)
				console.log('行业类别111111', arr1)
				let arr2 = []
				for (let k = 0; k < this.gongzhongList[e.indexs[0]].children[e.indexs[1]].children.length; k++) {
					arr2[k] = this.gongzhongList[e.indexs[0]].children[e.indexs[1]].children[k].skillName
				}
				// this.hangyeType = e.value[0]+'/'+e.value[1]+'/'+e.value[2]
				console.log('行业类别3', this.hangyeType)
				this.gongzhongcolumns.splice(2, 2, arr2)
				console.log('行业类别222222', arr2)
				if (columnIndex == 0) {
					let arr1 = []
					for (let k = 0; k < this.gongzhongList[e.indexs[0]].children.length; k++) {
						arr1[k] = this.gongzhongList[e.indexs[0]].children[k].skillName
					}
					this.gongzhongcolumns.splice(1, 1, arr1)
					let arr2 = []
					for (let k = 0; k < this.gongzhongList[e.indexs[0]].children[e.indexs[1]].children.length; k++) {
						arr2[k] = this.gongzhongList[e.indexs[0]].children[e.indexs[1]].children[k].skillName
					}
					// this.hangyeType = e.value[0]+'/'+e.value[1]+'/'+e.value[2]
					console.log('行业类别3', this.hangyeType)
					this.gongzhongcolumns.splice(2, 2, arr2)
				}

				this.model.skillLevel1 = this.gongzhongList[e.indexs[0]].id
				this.model.skillLevel2 = this.gongzhongList[e.indexs[0]].children[e.indexs[1]].id
				this.model.skillLevel3 = this.gongzhongList[e.indexs[0]].children[e.indexs[1]].children[e.indexs[
					2]].id
				this.hangyeTypeStr = this.gongzhongList[e.indexs[0]].skillName + '/' + this.gongzhongList[e.indexs[0]]
					.children[e.indexs[1]].skillName + '/' + this.gongzhongList[e.indexs[0]].children[e.indexs[1]]
					.children[e.indexs[2]].skillName
			},
			//查询工种
			getQueryType() {
				let types = "construction"
				this.Qurylist = []
				index.getPublicMember({}, 'client/skills/listV2/' + types, 'get', res => {
					console.log('所有工作', res.data)
					if (res.data.success && res.data.code == 200) {
						this.gongzhongList = res.data.result
						let arr = []
						for (let k = 0; k < this.gongzhongList.length; k++) {
							arr[k] = this.gongzhongList[k].skillName
						}
						// this.gongzhongcolumns[0] = arr
						console.log('行业类别1', arr)
						let arr1 = []
						for (let k = 0; k < this.gongzhongList[0].children.length; k++) {
							arr1[k] = this.gongzhongList[0].children[k].skillName
						}
						console.log('行业类别2', arr1)
						// this.gongzhongcolumns[1] = arr1
						let arr2 = []
						for (let k = 0; k < this.gongzhongList[0].children[0].children.length; k++) {
							arr2[k] = this.gongzhongList[0].children[0].children[k].skillName
						}
						console.log('行业类别3', arr2)
						this.hangyeTypeStr = arr[0] + '/' + arr1[0] + '/' + arr2[0]
						// this.gongzhongcolumns[2] = arr2
						// this.gongzhongcolumns.splice(arr,arr1,arr2)
						this.gongzhongcolumns.push(arr)
						this.gongzhongcolumns.push(arr1)
						this.gongzhongcolumns.push(arr2)
						console.log('行业类别选择数据源', this.gongzhongcolumns)
						this.model.skillLevel1 = this.gongzhongList[0].id
						this.model.skillLevel2 = this.gongzhongList[0].children[0].id
						this.model.skillLevel3 = this.gongzhongList[0].children[0].children[0].id
					}
				})
			},
			// 隐藏键盘
			hideKeyboard() {
				uni.hideKeyboard()
			},
		}
	}
</script>

<style>
	.u-textarea.data-v-09988a29 {
		background: none !important;
	}
</style>
<style lang="scss" scoped>
	@import url("index.css");
	@import url("@/static/css/publics.css");

	.tl-btn-120 {
		width: 180rpx;
		// padding: 17rpx;
		background: #F3F3F3;
		color: #999;
		border-radius: 13rpx;
		// border: 2rpx solid #dedede;
		text-align: center;
		height: 35px;
	}

	.onConfirmFiltrate {
		width: 180rpx;
		// padding: 17rpx;
		height: 25px;
		background: #2851F3;
		color: #FFFFFF;
		border-radius: 13rpx;
		text-align: center;
		margin-left: 35rpx;
	}


	/* 已选择 */
	.selde {
		border: 1px solid #0575ff;
		background: #0575ff;
		color: #FFFFFF;
		border-radius: 8px;
		font-size: 14px;
		// padding: 0 10upx;
		justify-content: center;
		display: flex;
		align-items: center;
		padding: 10px;
		text-align: center;
	}

	/* 未选择 */
	.noselde {
		display: flex;
		align-items: center;
		border: 1px solid #959595;
		background: #FFFFFF;
		color: #959595;
		border-radius: 8px;
		font-size: 14px;
		padding: 10px;
		text-align: center;
		justify-content: center;
	}

	.classifyBigBox {
		// margin: 47rpx 0;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		grid-gap: 50rpx;
		padding: 10px;
	}

	.oneClassify {
		display: flex;
		align-items: center;
		padding: 10px;
		justify-content: center;
		background: #F7F7F7;
		// border-radius: 13rpx;
		color: #424242;
		border-radius: 13rpx;
		// border: 2rpx solid #dedede; #F3F3F3
		// border: 2rpx solid #F3F3F3;
	}

	.selectActive {
		background: #0575FF;
		color: #F3F3F3;
	}

	.icon {
		width: 60px;
		height: 60px;
	}

	.userlefttext {
		color: #424242;
		font-size: 14px;
		font-family: PingFang SC;
		font-weight: 400;
	}

	.userrighttext {
		color: #A1A1A1;
		font-size: 12px;
		font-family: PingFang SC;
		font-weight: 400;
	}

	.job {
		display: flex;
		flex-direction: column;

		.job_title {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			margin-left: 15px;
			margin-right: 15px;
		}
	}

	.job_center {
		display: flex;
		flex-direction: column;
		margin: 15px;
		background-color: white;
		border-radius: 8px;

		.job_center_item {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			margin: 6px;
			height: 45px;
			text-align: center;
			align-items: center;
		}
	}

	.mypage {
		display: flex;
		flex-direction: column;
		background-color: #f6f6f6;
		height: 100vh;
	}

	.content {
		flex: 1;
		overflow: auto;
	}

	.footer {
		position: static;
		buttom: 0;
		left: 0;
		right: 0;
		background-color: white;
		text-align: center;

		.footer_bgview {
			width: 100%;
			height: 80px;
			text-align: center;
			justify-content: center;
			align-items: center;
			// margin-left: 25px;
			// margin-right: 25px;
		}

		.footer_btn {
			background-color: #0575FF;
			color: white;
			border-radius: 8px;
			margin: 25px;
		}
	}
</style>